//
//  MoreRespondView.m
//  万物记
//
//  Created by Ajen on 2019/6/16.
//  Copyright © 2019 Ajen. All rights reserved.
//

#import "MoreRespondView.h"

@implementation MoreRespondView{
    UILabel * titleLabel;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        
        CGFloat rightSpace = (0.45/6.3) * [UIScreen mainScreen].bounds.size.width;
        CGFloat bottomSpace = (0.3/6.3) * [UIScreen mainScreen].bounds.size.width;
        titleLabel = [UILabel new];
        titleLabel.aj_Text(@"更多功能").aj_textColorHexStr(@"#ffffff").aj_addToView(self);
        titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.mas_centerX).offset(rightSpace);
            make.bottom.equalTo(self.mas_centerY).offset(-bottomSpace);
        }];
        
        [self layoutIfNeeded];
        CGFloat labelCenterX = titleLabel.CenterX + ((2.4/6.3) * [UIScreen mainScreen].bounds.size.width);
        
        
        [titleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self.mas_left).offset(labelCenterX);
            make.bottom.equalTo(self.mas_centerY).offset(-bottomSpace);
        }];
        
        UIImageView * img = [UIImageView new];
        img.tintColor = [UIColor whiteColor];
        img.aj_imgName(@"更多W").aj_addToView(self);
        [img mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.equalTo(@50);
            make.centerX.equalTo(self.mas_left).offset(labelCenterX);
            make.bottom.equalTo(titleLabel.mas_top).offset(-10);
        }];
    }
    return self;
}

@end
